package com.bank.basic.service.impl;

import com.bank.basic.service.FileConnectService;
import com.bank.basic.util.ClientFactory;
import com.bank.basic.util.EntityFactory;
import com.bank.basic.util.MapperFactory;
import com.bank.basic.util.VoFactory;
import com.bank.model.entity.FileConnect;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.awt.image.ImageProducer;

/**
 * @author Cejay1314
 * @version 1.0
 * @create 2023/4/5 14:14
 */
@Service
public class FileConnectServiceImpl implements FileConnectService {
    @Autowired
    MapperFactory mapperFactory;
    @Autowired
    EntityFactory entityFactory;
    @Autowired
    VoFactory voFactory;
    @Autowired
    ClientFactory clientFactory;

    @Override
    public FileConnect querySourceID(Long sourceId) {
        QueryWrapper<FileConnect> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("source_id",sourceId);
        return mapperFactory.getFileConnectMapper().selectOne(queryWrapper);
    }

    @Override
    public FileConnect queryFileID(Long fileId) {
        QueryWrapper<FileConnect> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("file_id",fileId);
        return mapperFactory.getFileConnectMapper().selectOne(queryWrapper);
    }
}
